+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
+ function
+
+ * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
+ this function
+
2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in:
Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com>
-
+
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
+ function
+
+ * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
+ this function
+
2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in:
Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com>
-
+
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
+ function
+
+ * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
+ this function
+
2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in:
Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com>
-
+
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
+ function
+
+ * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
+ this function
+
2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in:
Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com>
-
+
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
+ function
+
+ * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
+ this function
+
2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in:
Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com>
-
+
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
+ function
+
+ * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
+ this function
+
2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in:
Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com>
-
+
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
+ function
+
+ * gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
+ this function
+
2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in:
Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com>
-
+
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still
@colorsel:
@use_palette:
+<!-- ##### FUNCTION gtk_container_focus ##### -->
+<para>
+
+</para>
+
+@container:
+@direction:
+@Returns:
+
<!-- ##### FUNCTION gtk_ctree_construct ##### -->
<para>
This function is not usually used by users.
@Returns:
-<!-- ##### FUNCTION gtk_container_focus ##### -->
-<para>
-
-</para>
-
-@container:
-@direction:
-@Returns:
-
-
<!-- ##### FUNCTION gtk_container_set_reallocate_redraws ##### -->
<para>
#GtkRcStyle structures to form a #GtkStyle.
</para>
+@parent_instance:
@name:
@bg_pixmap_name:
@font_desc:
_gtk_text_btree_get_iter_at_char (get_btree (buffer), iter, char_offset);
}
+/**
+ * gtk_text_buffer_get_start_iter:
+ * @buffer: a #GtkTextBuffer
+ * @iter: iterator to initialize
+ *
+ * Initialized @iter with the first position in the text buffer. This
+ * is the same as using gtk_text_buffer_get_iter_at_offset() to get
+ * the iter at character offset 0.
+ *
+ **/
+void
+gtk_text_buffer_get_start_iter (GtkTextBuffer *buffer,
+ GtkTextIter *iter)
+{
+ g_return_if_fail (iter != NULL);
+ g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer));
+
+ _gtk_text_btree_get_iter_at_char (get_btree (buffer), iter, 0);
+}
+
/**
* gtk_text_buffer_get_end_iter:
* @buffer: a #GtkTextBuffer
* character in the text buffer. If dereferenced with
* gtk_text_iter_get_char(), the end iterator has a character value of
* 0. The entire buffer lies in the range from the first position in
- * the buffer (call gtk_text_buffer_get_iter_at_offset() to get
+ * the buffer (call gtk_text_buffer_get_start_iter() to get
* character position 0) to the end iterator.
*
**/
void gtk_text_buffer_get_iter_at_line (GtkTextBuffer *buffer,
GtkTextIter *iter,
gint line_number);
+void gtk_text_buffer_get_start_iter (GtkTextBuffer *buffer,
+ GtkTextIter *iter);
void gtk_text_buffer_get_end_iter (GtkTextBuffer *buffer,
GtkTextIter *iter);
void gtk_text_buffer_get_bounds (GtkTextBuffer *buffer,
*
* Computes the effect of any tags applied to this spot in the
* text. The @values parameter should be initialized to the default
- * settings you wish to use if no tags are in effect.
+ * settings you wish to use if no tags are in effect. You'd typically
+ * obtain the defaults from gtk_text_view_get_default_attributes().
+ *
* gtk_text_iter_get_attributes () will modify @values, applying the
* effects of any tags present at @iter. If any tags affected @values,
- * the function returns TRUE.
+ * the function returns %TRUE.
*
- * Return value: TRUE if @values was modified
+ * Return value: %TRUE if @values was modified
**/
gboolean
gtk_text_iter_get_attributes (const GtkTextIter *iter,
}
}
+/**
+ * gtk_text_view_get_default_attributes:
+ * @text_view: a #GtkTextView
+ *
+ * Obtains a copy of the default text attributes. These are the
+ * attributes used for text unless a tag overrides them.
+ * You'd typically pass the default attributes in to
+ * gtk_text_tag_get_attributes() in order to get the
+ * attributes in effect at a given text position.
+ *
+ * The return value is a copy owned by the caller of this function,
+ * and should be freed.
+ *
+ * Return value: a new #GtkTextAttributes
+ **/
+GtkTextAttributes*
+gtk_text_view_get_default_attributes (GtkTextView *text_view)
+{
+ g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), NULL);
+
+ gtk_text_view_ensure_layout (text_view);
+
+ return gtk_text_attributes_copy (text_view->layout->default_style);
+}
+
static void
gtk_text_view_destroy_layout (GtkTextView *text_view)
{
void gtk_text_view_set_tabs (GtkTextView *text_view,
PangoTabArray *tabs);
PangoTabArray* gtk_text_view_get_tabs (GtkTextView *text_view);
-
+/* note that the return value of this changes with the theme */
+GtkTextAttributes* gtk_text_view_get_default_attributes (GtkTextView *text_view);
#ifdef __cplusplus
}